﻿IF EXISTS (SELECT * FROM sysobjects WHERE type = 'P' AND name = 'proc_cm_ListSiteMapNode')
BEGIN
    PRINT 'Dropping Procedure proc_cm_ListSiteMapNode'
    DROP  Procedure  proc_cm_ListSiteMapNode
END
GO

PRINT 'Creating Procedure proc_cm_ListSiteMapNode'
GO

CREATE PROCEDURE [dbo].[proc_cm_ListSiteMapNode]
AS
BEGIN
    -- SET NOCOUNT ON added to prevent extra result sets from
    -- interfering with SELECT statements.
    SET NOCOUNT ON;

	select
		[node_id]
		,[node_title]
		,[node_url]
		,[node_cd]
		,[node_description]
		,[parent_node_id]
		,[role]
		,[display_order_num]
		,[use_generic_page_ind]
		,[generic_page_type]
		,[admin_users]
	from
		[dbo].[tbl_sitemap] (nolock)
	order by
		[display_order_num]
END
GO

GRANT EXEC ON dbo.proc_cm_ListSiteMapNode TO PUBLIC
GO
